#ifndef __OSAL_TASK_H
#define __OSAL_TASK_H

#ifdef __cplusplus
 extern "C" {
#endif
#include "System.h"

#if(RTOS_TYPE == RTOS_AZURERTOS)

#include "tx_api.h"

typedef  TX_THREAD	OSAL_TaskTCB;
	
#elif(RTOS_TYPE == RTOS_FREERTOS)
	
#else
typedef  void   	OSAL_TaskTCB;
#endif

typedef struct {
    CHAR  *taskName;
    VOID (*function)(ULONG id);
    ULONG param;
    VOID *stackAddr;
    ULONG stackSize;
    UINT  priority;
    UINT  preemptThreshold;
    ULONG timeSlice;
    UINT autoStart;
}TaskAttr_T;


UINT8 OSAL_TaskCreate(OSAL_TaskTCB *_taskId,TaskAttr_T *_attr);


	
#ifdef __cplusplus
}
#endif
#endif


